OT: Vytvoreni zastupce z programu
Otázka od: Dalibor Faltynel
27. 10. 2004 12:18
Dobry den.
Asi je to trochu OT, ale nevedel by nekdo jak vytvorit zastupce na plochu, nebo
jej aspon nakonfigurovat co se tyce cile a kde zacit? Pro win XP a win 98.
Dalibor.
Odpovedá: Jiri Cincura
27. 10. 2004 14:44
Dalibor Faltynel wrote:
> Dobry den.
> Asi je to trochu OT, ale nevedel by nekdo jak vytvorit zastupce na
> plochu, nebo jej aspon nakonfigurovat co se tyce cile a kde zacit? Pro
> win XP a win 98. Dalibor.
Stacilo hledat:
Uses FileCtrl,ShlObj, ActiveX, ComObj;
procedure CreateLink(WorkingDirectory,
FileName,
Arguments: String;
TargetLinkFile: WideString;
Description,
IconPath: String;
IconIdex: Integer);
var
MyObject : IUnknown;
MySLink : IShellLink;
MyPFile : IPersistFile;
begin
MyObject := CreateComObject(CLSID_ShellLink);
MySLink := MyObject as IShellLink;
MyPFile := MyObject as IPersistFile;
with MySLink do
begin
SetArguments (PChar(Arguments ));
SetPath (PChar(FileName));
SetWorkingDirectory(PChar(WorkingDirectory));
SetDescription (PChar(Description));
SetIconLocation (PChar(IconPath), IconIdex);
end;
// Vytvoreni slozky - "programove skupiny"
If Not DirectoryExists(ExtractFileDir(TargetLinkFile)) then
CreateDir(ExtractFileDir(TargetLinkFile));
MyPFile.Save(PWChar(TargetLinkFile),False);
MySLink := Nil;
MyPFile := Nil;
MyObject := Nil;
end;
--
Jiri Cincura
e-mail: mailto:jiri@cincura.net; | http://www.cincura.net/
mailto:xcincura@informatics.muni.cz | http://photo.cincura.net/
ICQ: 314711544 | http://phorum.cincura.net/
---
And if our times are difficult and perplexing,
so are they challenging and filled with opportunity.
-Robert F. Kennedy, 1961
Odpovedá: Karel Kral
29. 10. 2004 13:35
Nebo z Jcl: JclShell.ShellLinkCreate
Jiri Cincura napsal(a):
> Dalibor Faltynel wrote:
>
>>Dobry den.
>>Asi je to trochu OT, ale nevedel by nekdo jak vytvorit zastupce na
>>plochu, nebo jej aspon nakonfigurovat co se tyce cile a kde zacit? Pro
>>win XP a win 98. Dalibor.
>
>
> Stacilo hledat:
>
> Uses FileCtrl,ShlObj, ActiveX, ComObj;
> procedure CreateLink(WorkingDirectory,
> FileName,
--
______________________________________________________
Karel Kral, vedouci odd. IT / IT manager
Purus, s.r.o., Cezavy 627, 664 56 Blucina, CZ
Tel: 547 235 000, 602 552 432, Fax: 547 231 203
E-Mail: mailto:kral@purus.cz, WWW: http://www.purus.cz
______________________________________________________